package com.guoguo.service;

import java.text.ParseException;
import java.util.List;
import java.util.Map;

import com.guoguo.entity.Orders;
import com.guoguo.entity.UserExt;

/**
 * Created by Administrator on 2017/9/13 0013.
 */
public interface IPayService {
    /**
     * 生成订单
     *
     * @param payType
     * @param userId
     * @return
     */
    public Orders createOrder(int payType, String userId);

    /**
     * 支付流水明细
     *
     * @param payType
     * @param orderNo
     * @param price
     * @return
     */
    public int createPayJournal(int payType, String orderNo, String albId, String price);

    /**
     * 支付回调方法
     *
     * @param rechargeId
     * @param payType
     * @param userExt
     */
    public void payCallBack(String rechargeId, int payType, UserExt userExt);

    /**
     * 查询用户充值记录
     *
     * @param userId
     * @return
     */
    public List<Orders> getOrderList(String userId);


	/**
	 * 请求生成商户订单
	 * @param mhtOrderType
	 * @param mhtOrderName
	 * @param mhtOrderAmt
	 * @param mhtOrderDetail
	 * @param mhtOrderTimeOut
	 * @param mhtOrderStartTime
	 * @param consumerId
	 * @return
	 * @throws Exception 
	 */
	public Map<String, String> creatPayOrder(String mhtOrderType,String mhtOrderName, String mhtOrderAmt, String mhtOrderDetail, String mhtOrderTimeOut, String mhtOrderStartTime, String consumerId) throws Exception;

	/**
	 * 商户支付结果
	 * @param channelOrderNo 
	 * @param nowPayOrderNo 
	 * @param mhtOrderAmt 
	 * @param string
	 * @param string2
	 * @param string3
	 * @return
	 * @throws ParseException 
	 */
	public boolean creatPayMessage(String mhtOrderNo, String tradeStatus, String payTime, String nowPayOrderNo, String channelOrderNo, String mhtOrderAmt) throws ParseException;

	/**
	 * 更新支付报文数据
	 * @param needcheckmsg
	 * @param mhtOrderNo 
	 * @return
	 */
	public Integer updateNeedcheckmsg(String mhtOrderNo,String needcheckmsg);
    
	/**
	 * 查询订单表的数据签名
	 * @param needcheckmsg
	 * @param mhtOrderNo 
	 * @return
	 */
	public String selectSignature(String mhtOrderNo);

	/**
	 * @param mhtOrderNo
	 * @param string
	 * @param payTime
	 * @param nowPayOrderNo
	 * @param channelOrderNo
	 * @return
	 */
	public boolean creatPayMessageNoti(String mhtOrderNo, String string, String payTime, String nowPayOrderNo, String channelOrderNo)throws ParseException;


}
